﻿<UserControl x:Class="MetaTracker.View.WeightServiceView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:diag="clr-namespace:System.Diagnostics;assembly=WindowsBase"
             mc:Ignorable="d" 
             d:DesignHeight="448" d:DesignWidth="601"
             Loaded="WeightServiceView_Loaded">
    <StackPanel
        HorizontalAlignment="Center"
        VerticalAlignment="Center"
        >
        <DataGrid AutoGenerateColumns="True" 
                  Height="374" Name="dataGrid1" Width="502" 
                  ItemsSource="{Binding WeightData, 
                    UpdateSourceTrigger=PropertyChanged, 
                    diag:PresentationTraceSources.TraceLevel=High}" 
                  AutoGeneratingColumn="AutoGeneratedColumnRenamer"/>
        <Button Content="_Refresh" 
                Height="23" Margin="0,0,0,20"
                HorizontalAlignment="Center" 
                Name="button1" VerticalAlignment="Center" Width="75" 
                Command="{Binding RefreshCommand}"/>
        <TextBlock Margin="0,00,0,0" HorizontalAlignment="Center"
                   Visibility="{Binding IsUsingFatSecret, Converter={StaticResource BoolToHidden}}">           
            <Hyperlink NavigateUri="http://platform.fatsecret.com" 
                       RequestNavigate="Hyperlink_RequestNavigate">
                Powered by FatSecret
            </Hyperlink>
        </TextBlock>
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" 
                    Visibility="{Binding IsUsingFitbit, Converter={StaticResource BoolToHidden}}">
            <TextBlock Margin="0,0,3,0" HorizontalAlignment="Center" VerticalAlignment="Center">
            <Hyperlink NavigateUri="http://www.fitbit.com" 
                       RequestNavigate="Hyperlink_RequestNavigate">
                Data from
            </Hyperlink>
            </TextBlock>
            <TextBlock>
            <Hyperlink NavigateUri="http://www.fitbit.com" TextDecorations="none"
                       RequestNavigate="Hyperlink_RequestNavigate">
                <Image Source="../Resources/fitbit_logo_dark_50px.png" Width="50" Height="20"/>
            </Hyperlink>
            </TextBlock>
        </StackPanel>
    </StackPanel>
</UserControl>
